generic repository and unit of work pattern c